<?php

class ModNivelAcceso{
	
	public $bd;
	public $resultado;

	
	public function __construct(){
		
		$this->bd = new Basedatos();
		
	}
		public function mostrar_mna(){
		
		$query = "CALL ConsultarModulosDeNivelAcceso()";
		$this->result = $this->bd->select($query);
		return $this->result;		
		
	}
		public function editar_na(){
		
		$query = "SELECT * FROM cargo";
		$this->result = $this->objDb->select($query);
		return $this->result;		
		
	}
		public function insertar_na(){
		
		$query = "CALL IngresarCargo('".$_POST["nombre"]."', '".$_POST["descr"]."')";
		$res = mysql_query($query);
		
	}
	public function ingreso_mna(){
		$query ="CALL IngresarModuloNivelAcceso('".$_POST["variable"]."', '".$_POST["deshabi"]."')";
		$this->result = $this->bd->insert($query);
	}
	public function elimina_mna(){
		$query ="CALL IngresarModuloNivelAcceso('".$_POST["variable"]."', '".$_POST["habi"]."')";
		$this->result = $this->bd->insert($query);
	}

}
?>